<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN" "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
    <title>PHPXRef 0.7.1 : Tomato Project : Detail view of upload.class.php</title>
    <link rel="stylesheet" href="../../../sample.css" type="text/css">
    <link rel="stylesheet" href="../../../sample-print.css" type="text/css" media="print">
    <style id="hilight" type="text/css"></style>
    <meta http-equiv="content-type" content="text/html;charset=UTF-8">
</head>
<body bgcolor="#ffffff" text="#000000" link="#801800" vlink="#300540" alink="#ffffff">
<table class="pagetitle" width="100%">
	<tr>
        <td valign="top" class="pagetitle">
            [ <a href="../../../index.html">Index</a> ] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_classes/index.html">Classes</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_functions/index.html">Functions</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_variables/index.html">Variables</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_constants/index.html">Constants</a>] 
			&nbsp;&nbsp;&nbsp; [<a href="../../../_tables/index.html">Tables</a>]
        </td>
        <td align="right" class="pagetitle">
		    <h2 style="margin-bottom: 0px">PHP Cross Reference of Tomato Project</h2>
	    </td>
    </tr>
</table>


<!-- Generated by PHPXref 0.7.1 at Thu Sep 10 15:54:52 2020 -->
<!-- PHPXref (c) 2000-2010 Gareth Watts - gareth@omnipotent.net -->
<!-- http://phpxref.sourceforge.net/ -->

<script src="../../../phpxref.js" type="text/javascript"></script>
<script language="JavaScript" type="text/javascript">
<!--
ext='.html';
relbase='../../../';
subdir='core/v0.1/ext';
filename='upload.class.php.html';
cookiekey='phpxref';
handleNavFrame(relbase, subdir, filename);

// -->
</script>
<script language="JavaScript" type="text/javascript">
if (gwGetCookie('xrefnav')=='off')
  document.write('<p class="navlinks">[ <a href="javascript:navOn()">Show Explorer<\/a> ]<\/p>');
else
  document.write('<p class="navlinks">[ <a href="javascript:navOff()">Hide Explorer<\/a> ]<\/p>');
</script>
<noscript>
<p class="navlinks">
[ <a href="../../../nav.html" target="_top">Show Explorer</a> ]
[ <a href="index.html" target="_top">Hide Navbar</a> ]
</p>
</noscript>
<script language="JavaScript" type="text/javascript">
<!--

document.writeln('<table align="right" class="searchbox-link"><tr><td><a class="searchbox-link" href="javascript:void(0)" onMouseOver="showSearchBox()">Search</a><br>');
document.writeln('<table border="0" cellspacing="0" cellpadding="0" class="searchbox" id="searchbox">');
document.writeln('<tr><td class="searchbox-title">');
document.writeln('<a class="searchbox-title" href="javascript:showSearchPopup()">Search History +</a>');
document.writeln('<\/td><\/tr>');

document.writeln('<tr><td class="searchbox-body" id="searchbox-body">');
document.writeln('<form name="search" style="margin:0px; padding:0px" onSubmit=\'return jump()\'>');
document.writeln('<a class="searchbox-body" href="../../../_classes/index.html">Class<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="classname"><br>');
document.writeln('<a id="funcsearchlink" class="searchbox-body" href="../../../_functions/index.html">Function<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="funcname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_variables/index.html">Variable<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="varname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_constants/index.html">Constant<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="constname"><br>');
document.writeln('<a class="searchbox-body" href="../../../_tables/index.html">Table<\/a>: ');
document.writeln('<input type="text" size=10 value="" name="tablename"><br>');
document.writeln('<input type="submit" class="searchbox-button" value="Search">');
document.writeln('<\/form>');
document.writeln('<\/td><\/tr><\/table>');
document.writeln('<\/td><\/tr><\/table>');
// -->
</script>
<div id="search-popup" class="searchpopup"><p id="searchpopup-title" class="searchpopup-title">title</p><div id="searchpopup-body" class="searchpopup-body">Body</div><p class="searchpopup-close"><a href="javascript:gwCloseActive()">[close]</a></p></div>
<h2 class="details-heading"><a href="./index.html">/core/v0.1/ext/</a> -> <a href="upload.class.php.source.html">upload.class.php</a> (summary)</h2>
<div class="details-summary">
<p class="viewlinks">[<a href="upload.class.php.source.html">Source view</a>]
[<a href="javascript:window.print();">Print</a>]
[<a href="../../../_stats.html">Project Stats</a>]</p>
<p><b>(no description)</b></p>
<table>
<tr><td align="right">File Size: </td><td>322 lines (11 kb)</td></tr>
<tr><td align="right">Included or required:</td><td>0 times</td></tr>
<tr><td align="right" valign="top">Referenced: </td><td>0 times</td></tr>
<tr><td align="right" valign="top">Includes or requires: </td><td>0 files</td></tr>
</table>
<h3>Defines 1 class</h3>
<div class="inset">
<p><b>upload::</b> (15 methods):<br>
&nbsp;&nbsp;<a href="#__construct">__construct</a>()<br>
&nbsp;&nbsp;<a href="#set">Set</a>()<br>
&nbsp;&nbsp;<a href="#geterror">GetError</a>()<br>
&nbsp;&nbsp;<a href="#upload">Upload</a>()<br>
&nbsp;&nbsp;<a href="#getinfo">GetInfo</a>()<br>
&nbsp;&nbsp;<a href="#getfiles">getFiles</a>()<br>
&nbsp;&nbsp;<a href="#getfilename">getFileName</a>()<br>
&nbsp;&nbsp;<a href="#makedir">makeDir</a>()<br>
&nbsp;&nbsp;<a href="#setfileinfo">setFileInfo</a>()<br>
&nbsp;&nbsp;<a href="#movefile">moveFile</a>()<br>
&nbsp;&nbsp;<a href="#checklength">checkLength</a>()<br>
&nbsp;&nbsp;<a href="#check">check</a>()<br>
&nbsp;&nbsp;<a href="#checksize">checkSize</a>()<br>
&nbsp;&nbsp;<a href="#checktype">checkType</a>()<br>
&nbsp;&nbsp;<a href="#checkerr">checkErr</a>()<br>
</p>
</div>
</div>
<br><div class="details-funclist">
<div class="details-classinfo">
<p class="details-classtitle">Class: <a name="upload"><b>upload</b></a>&nbsp;&nbsp;- <a href="../../../_classes/upload.html"><small>X-Ref</small></a>
</p>
<b>$conf['path'] = P_PUBLIC . 'uploads/img';<BR>
$conf['allowType'] = array('jpg','gif','png');<BR>
$conf['maxSize'] = 1024*1024;<BR>
$up = new upload($conf);<BR>
$result = $up-&gt;upload(true);//参数true遇到错误继续，返回上传的文件信息，键名对应表单的name值<BR>
$info = $up-&gt;getInfo();//返回上传文件信息，索引数组<BR>
$err = $up-&gt;getError();//返回错误信息，数组<BR>
</b><br>
<div class="inset"><table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="__construct" onClick="logFunction('__construct', 'upload.class.php.source.html#l28')" href="upload.class.php.source.html#l28">__construct</a>(<a href="../../../_variables/conf.html">$conf</a> = null)&nbsp;&nbsp;
<a href="../../../_functions/__construct.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><i>No description</i></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="set" onClick="logFunction('set', 'upload.class.php.source.html#l51')" href="upload.class.php.source.html#l51">Set</a>(<a href="../../../_variables/name.html">$name</a>, <a href="../../../_variables/value.html">$value</a> = null)&nbsp;&nbsp;
<a href="../../../_functions/set.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>设置参数<BR>
</b><BR><b>param:</b> [string,array] $name&nbsp;&nbsp;[description]<br>
<b>param:</b> [type] $value [description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="geterror" onClick="logFunction('geterror', 'upload.class.php.source.html#l67')" href="upload.class.php.source.html#l67">GetError</a>()&nbsp;&nbsp;
<a href="../../../_functions/geterror.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>获取错误信息<BR>
</b><BR><b>return:</b> [array] [description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="upload" onClick="logFunction('upload', 'upload.class.php.source.html#l76')" href="upload.class.php.source.html#l76">Upload</a>(<a href="../../../_variables/ignore.html">$ignore</a> = false)&nbsp;&nbsp;
<a href="../../../_functions/upload.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>[执行上传操作]<BR>
</b><BR><b>param:</b> boolean $ignore [遇到上传错误是否继续]<br>
<b>return:</b> [array]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[数组键名对应form表单的name]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="getinfo" onClick="logFunction('getinfo', 'upload.class.php.source.html#l103')" href="upload.class.php.source.html#l103">GetInfo</a>(<a href="../../../_variables/index.html">$index</a> = true)&nbsp;&nbsp;
<a href="../../../_functions/getinfo.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>返回文件信息<BR>
</b><BR><b>param:</b> boolean $index [是否索引数组]<br>
<b>return:</b> [type]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="getfiles" onClick="logFunction('getfiles', 'upload.class.php.source.html#l113')" href="upload.class.php.source.html#l113">getFiles</a>()&nbsp;&nbsp;
<a href="../../../_functions/getfiles.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>获取文件基本信息<BR>
</b><BR><b>return:</b> [type] [description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="getfilename" onClick="logFunction('getfilename', 'upload.class.php.source.html#l174')" href="upload.class.php.source.html#l174">getFileName</a>(<a href="../../../_variables/i.html">$i</a>)&nbsp;&nbsp;
<a href="../../../_functions/getfilename.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>获取新文件名<BR>
</b><BR></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="makedir" onClick="logFunction('makedir', 'upload.class.php.source.html#l191')" href="upload.class.php.source.html#l191">makeDir</a>()&nbsp;&nbsp;
<a href="../../../_functions/makedir.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>创建目录<BR>
</b><BR></td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="setfileinfo" onClick="logFunction('setfileinfo', 'upload.class.php.source.html#l215')" href="upload.class.php.source.html#l215">setFileInfo</a>(<a href="../../../_variables/i.html">$i</a>)&nbsp;&nbsp;
<a href="../../../_functions/setfileinfo.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>设置文件信息<BR>
</b><BR><b>param:</b> [type] $i [description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="movefile" onClick="logFunction('movefile', 'upload.class.php.source.html#l226')" href="upload.class.php.source.html#l226">moveFile</a>(<a href="../../../_variables/i.html">$i</a>)&nbsp;&nbsp;
<a href="../../../_functions/movefile.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>保存文件<BR>
</b><BR><b>param:</b> [type] $i [description]<br>
<b>return:</b> [type]&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="checklength" onClick="logFunction('checklength', 'upload.class.php.source.html#l243')" href="upload.class.php.source.html#l243">checkLength</a>()&nbsp;&nbsp;
<a href="../../../_functions/checklength.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>检查POST数据是否合法<BR>
</b><BR><b>return:</b> [type] [description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="check" onClick="logFunction('check', 'upload.class.php.source.html#l257')" href="upload.class.php.source.html#l257">check</a>(<a href="../../../_variables/name.html">$name</a>, <a href="../../../_variables/size.html">$size</a>, <a href="../../../_variables/fix.html">$fix</a>, <a href="../../../_variables/err.html">$err</a>)&nbsp;&nbsp;
<a href="../../../_functions/check.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>检查文件合法性<BR>
</b><BR><b>param:</b> [string] $name 文件名<br>
<b>param:</b> [integer] $size 文件大小<br>
<b>param:</b> [string] $fix&nbsp;&nbsp;文件后缀<br>
<b>param:</b> [integer] $err&nbsp;&nbsp;错误号<br>
<b>return:</b> [integer]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="checksize" onClick="logFunction('checksize', 'upload.class.php.source.html#l270')" href="upload.class.php.source.html#l270">checkSize</a>(<a href="../../../_variables/size.html">$size</a>, <a href="../../../_variables/fileName.html">$fileName</a>)&nbsp;&nbsp;
<a href="../../../_functions/checksize.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>检查文件大小<BR>
</b><BR><b>param:</b> [integer] $size&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
<b>param:</b> [string] $fileName [description]<br>
<b>return:</b> [integer]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="checktype" onClick="logFunction('checktype', 'upload.class.php.source.html#l290')" href="upload.class.php.source.html#l290">checkType</a>(<a href="../../../_variables/fix.html">$fix</a>, <a href="../../../_variables/fileName.html">$fileName</a>)&nbsp;&nbsp;
<a href="../../../_functions/checktype.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>检查文件后缀合法性<BR>
</b><BR><b>param:</b> [string] $fix&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
<b>param:</b> [string] $fileName [description]<br>
<b>return:</b> [integer]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
<table border="0" width="80%" class="funcinfo"><tr class="funcinfo-title"><td>
<a name="checkerr" onClick="logFunction('checkerr', 'upload.class.php.source.html#l307')" href="upload.class.php.source.html#l307">checkErr</a>(<a href="../../../_variables/err.html">$err</a>, <a href="../../../_variables/fileName.html">$fileName</a>)&nbsp;&nbsp;
<a href="../../../_functions/checkerr.html"><small>X-Ref</small></a>
</td></tr><tr class="funcinfo-body"><td><b>检查错误号<BR>
</b><BR><b>param:</b> [integer] $err&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
<b>param:</b> [string] $fileName [description]<br>
<b>return:</b> [integer]&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;[description]<br>
</td></tr></table>

<br>
</div>
</div>

</div>
<!-- A link to the phpxref site in your customized footer file is appreciated ;-) -->
<br><hr>
<table width="100%">
	<tr><td>Generated: Thu Sep 10 15:54:52 2020</td>
	<td align="right"><i>Cross-referenced by <a href="http://phpxref.sourceforge.net/">PHPXref 0.7.1</a></i></td>
	</tr>
</table>
</body></html>
